package com.station.server.entity;

import javax.persistence.*;

/**
 * User: JinJavaMojo
 * Date: 25.09.13
 */
@Table(name = "PETROL_PUMP", schema = "public", catalog = "")
@Entity
public class PetrolPump extends PlaceableEntity {

    @Column(name = "FILLING_SPEED")
    private double fillingSpeed;

    @JoinColumn(name="CONNECTED_FUEL_TANK")
    @ManyToOne(optional = true, cascade = CascadeType.ALL)
    private com.station.server.entity.FuelTank connectedFuelTank;

//    @JoinColumn(name="STATION_ID")
//    @ManyToOne(optional = true, cascade = CascadeType.MERGE)
//    public Station station;

    public FuelTank getConnectedFuelTank() {
        return connectedFuelTank;
    }

    public void setConnectedFuelTank(FuelTank connectedFuelTank) {
        this.connectedFuelTank = connectedFuelTank;
    }

    public double getFillingSpeed() {
        return fillingSpeed;
    }

    public void setFillingSpeed(double fillingSpeed) {
        this.fillingSpeed = fillingSpeed;
    }
}
